package com.example.selenium.queue.rabbitmq;

import com.example.selenium.queue.rabbitmq.f.MessageInfo;
import lombok.Data;
import org.springframework.amqp.rabbit.connection.CorrelationData;

/**
 * @Author : 刘思盖
 * @Date : 2021/9/24 17:02
 */
@Data
public class CorrelationDataExt extends CorrelationData {

    private MessageInfo messageInfo;

    public CorrelationDataExt(String waybillNo,String data){
        MessageInfo messageInfo = new MessageInfo();
        messageInfo.setData(data);
        messageInfo.setWaybillNo(waybillNo);
        this.messageInfo = messageInfo;
        this.setId(waybillNo);
    }

    public CorrelationDataExt(String data){
        this.messageInfo = new MessageInfo();
        this.messageInfo.setData(data);
    }
}
